// @ts-ignore
/* eslint-disable */

/**
 * 该文件为 @umijs/openapi 插件自动生成，请勿随意修改。如需修改请通过配置 openapi.config.ts 进行定制化。
 * */

import { request, type RequestOptions } from "@/utils/request";

/** 创建新类别 POST /api/categories/create */
export async function apiCategoriesCreateReq(
  body: {
    /** 类别名称 */
    name: string;
    /** 类别描述 */
    description?: string;
  },
  options?: RequestOptions
) {
  return request<API.Category>("/api/categories/create", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || { successMsg: "创建成功" }),
  });
}
